licenses(["notice"])  # Apache 2.0

package(default_visibility = ["//tools/build_defs:internal_pkg"])

load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")

filegroup(
    name = "srcs",
    srcs = glob(
        [
            "*.java",
        ],
    ),
)

# public interfaces

java_library(
    name = "awskms",
    srcs = [
        ":srcs",
    ],
    javacopts = JAVACOPTS_OSS,
    plugins = [
        ":auto_service_plugin",
    ],
    runtime_deps = [
        "@com_fasterxml_jackson_core_jackson_annotations",
        "@com_fasterxml_jackson_core_jackson_databind",
        "@commons_logging",
        "@joda_time",
        "@org_apache_httpcomponents_httpclient",
        "@org_apache_httpcomponents_httpcore",
    ],
    deps = [
        "//java/src/main/java/com/google/crypto/tink",
        "//java/src/main/java/com/google/crypto/tink/subtle",
        "@com_amazonaws_aws_java_sdk_core",
        "@com_amazonaws_aws_java_sdk_kms",
        "@com_google_auto_service",
    ],
)

java_plugin(
    name = "auto_service_plugin",
    processor_class = "com.google.auto.service.processor.AutoServiceProcessor",
    deps = [
        "@com_google_auto_common",
        "@com_google_auto_service",
        "@com_google_guava",
    ],
)
